<div data-id="config_id" class='bc-list weui-table editor-label-content hidden' data-port="http://api.hongyanche.com/mall_admin/config_getlist" id='editor-config-list'>
    <style>#editor-brand-list-header.bc-scroll-float+*{margin-top:55px;}#editor-config-list-header.bc-scroll-float{background: white;box-shadow: 0 0 5px #666;}
    .editor-label-remove, .editor-config-remove, .editor-config-option-remove{
        z-index: 998;
    }
    </style>
    <input autocomplete='off' class='hidden' id = 'template_id' name='config_template_id' id="1" />
    <div class='weui-panel'>
        <div class='weui-panel__hd bc-scroll-move' id = "editor-config-list-header">
            <div class='weui-flex-center' style="min-height: 35px;color:#666">
                <div class='weui-flex__item '>
                    <span class='editor-config-content hidden'>编辑配置
                        <!--<a class='pointer weui-cell_link bc-list-reload'>刷新<i class='i i-refresh'></i></a>-->
                    </span>
                    <span class='editor-config-edit1'>
						<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectAll'>全选</a>
						<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectReverse'>反选</a>
						<span class='weui-btn weui-btn_mini weui-btn_warn' id='editor-config-remove'>删除</span>
					</span>
                </div>
                <!--选择：-->
                <!--<span id='editor-config-labels_text'>全部</span>-->
                &nbsp;
                <span class='link editor-config-edit1' id='editor-config-create'>＋ 新增配置</span>
                &nbsp;&nbsp;&nbsp;
                <!--<a class='weui-cell_link' id="editor-config-edit-btn">编辑</a> &nbsp;&nbsp;&nbsp;-->
                <a class='weui-cell_link editor-config-content' id="back">返回</a>
                <a class='bc-list-edit hidden'></a>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">模板名</label></div>
            <div class="weui-cell__bd">
                <input type="text" id = 'template_name' name="template_name" class="weui-input" placeholder="请输入模板名">
            </div>
        </div>
        <!-- <div class='weui-panel__hd'> -->
        <div class='bc-list-content' id='editor-config-list-content'>
        </div>
        <!-- </div> -->

        <div class='bc-list-template'>
            <div style="display: flex; flex-direction: column">
                <div class='weui-cell blur' style="align-items: stretch; ">
                    <label class='editor-config-edit1 box bc-list-checkbox' style='padding-top: 6px;'>
                        <input autocomplete='off' class='weui-check' type='checkbox' />
                        <i class="weui-icon weui-icon-checked-circle" style="font-size: 150%"></i>
                    </label>
                    <div class='weui-cell__hd' style='width:80px;padding-top: 6px;'>
                        <div  class='editor-config-edit1'>
                            <input autocomplete='off' list=1 name='config_name_cn' style='width:80px;margin-top: -3px' class='editor-config-name-input weui-btn weui-btn_mini weui-btn_default' placeholder="配置名称" /><br/>
                        </div>
                        <!--<div class='editor-config-content'>-->
                        <!--<config_name_cn list=1 style='margin-top: 5px' class='editor-config-content'>config</config_name_cn>-->
                        <!--&lt;!&ndash; <small mute> #<config_id list=1></config_id></small> &ndash;&gt;-->
                        <!--</div>-->

                    </div>
                    <div style='padding-top: 8px;'>:</div>
                    <style type="text/css">config_options:after{clear: none!important}</style>
                    <div class='weui-cell__bd' style='flex:2;font-size: 14px;'>
                        <config_options class='product-label-box bc-float' list=r>
                            <label>
                                <config_option_id class='hidden' range=1></config_option_id>
                                <p class='editor-config-edit1 pointer' align="right"><a class='editor-config-option-remove'><i class='weui-icon weui-icon-cancel weui-icon-original'></i></a></p>
                                <div style="width:60px;">
                                    <option_name_cn range=1></option_name_cn><br/>
                                </div>
                            </label>
                        </config_options>
                        <span class='bc-float editor-config-option-clean product-label-box editor-config-edit1'>
						<label style=''>
							<div style="width:60px;color:#F43530;">
								清空
							</div>
						</label>
					</span>
                    </div>
                    <div class="editor-config-edit1" style='padding-top: 6px;'>
                        <input autocomplete='off' style='width: 80px;' class='editor-config-option-create editor-config-edit1 weui-btn weui-btn_mini weui-btn_default' placeholder="添加新选项" />
                    </div>
                    <!--<label class="weui-cell__ft editor-config-content" style='padding-top: 6px;'>-->
                    <!--<input autocomplete='off' checked='checked' list=1 name='released' class="editor-config-release-switch weui-switch" type="checkbox">-->
                    <!--</label>-->
                    <div class="editor-config-edit-range" style='padding-top: 8px;'>
                        <i class='i i-menu' style="margin:5px;cursor: move"></i>
                    </div>

                </div>
                <div class='editor-config-edit1' style="flex: 1; padding-left: 66px">
                    配置描述：
                    <input autocomplete='off' list=1 name='config_descripton' style='width:360px;margin-top: 5px' class='editor-config-descripton-input weui-btn weui-btn_mini weui-btn_default' placeholder="配置描述" /><br/>
                </div>
            </div>
        </div>
    </div>
</div>
<sss>
    $('#editor-config-list').on('bc-list-success',function(){
    $(this).find('.box').attr('style','')
    })
    $('#editor-config-template-list').on('click', '.js-template-item', function () {
    let ID = $(this).find('config_template_id').text();
    let name = $(this).find('name').text();
    $('#template_id').val(ID)
    $('#template_name').val(name)
    $('#editor-config-list').removeClass('hidden');
    $('#editor-config-template-list').hide()
    LIST.reload('#editor-config-list');
    })

    $('#back').click(function(){
    $('#editor-config-list').addClass('hidden');
    $('#editor-config-template-list').show()
    LIST.reload('#editor-config-template-list');
    })
    $('#template_name').on('blur',function(){
    var template_id = $('#template_id').val();
    var template_name = $('#template_name').val();
    $.ajax({
    url:'http://api.hongyanche.com/mall_admin/config_template_modify',
    type:'POST',
    xhrFields:{
    withCredentials:true
    },
    data:{
    config_template_id:template_id,
    new_template_name:template_name
    },
    success:function (e) {
    LIST.reload('#editor-config-list');
    }
    })
    })
    $('#add-template-btn').click(function () {
    $('#editor-config-list').removeClass('hidden');
    $('#editor-config-template-list').hide()
    $.ajax({
    url:'http://api.hongyanche.com/mall_admin/config_template_create',
    type:'POST',
    xhrFields:{
    withCredentials:true
    },
    data:{
    },
    success:function (e) {
    $('#template_id').val(e.data.config_template_id)
    LIST.reload('#editor-config-list');
    $('#template_name').val('')
    }
    })
    })
    $(window).load(function(){
    $('.blur').mousedown(function(){
    document.activeElement.blur();
    });
    });

</sss>